<?php

namespace zhuli\test;

require __DIR__ . '/zhuli/core/DiInterface.php';
require __DIR__ . '/zhuli/core/DependencyInterface.php';

class Person
{

}

class People
{
	public function __construct(Person $person)
	{

	}
}

interface PeopleAboutInterface
{

}

class PeopleAbout implements PeopleAboutInterface
{
	public $name;
	public $provience;
	public $age;
	public $hobby;

	public function __construct(Person $person, $name, $provience, $hobby, $age = '18')
	{
		$this->name = $name;
		$this->provience = $provience;
		$this->age = $age;
		$this->hobby = $hobby;
	}
}


$di = new \zhuli\core\DependencyInterface();

$person = $di->get('zhuli\test\Person');
print_r($person);

$people = $di->get('zhuli\test\People');
print_r($people);

$di->set('zhuli\test\PeopleAboutInterface', 'zhuli\test\PeopleAbout');
$di->set('zhuli\test\PeopleAbout', [
    'name' => '珠砾',
    'provience' => '福建省',
    'hobby'=>'eat drink play happy'
]);


$people = $di->get('zhuli\test\PeopleAboutInterface');
print_r($people);